package com.example.yoho.utils;

import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;

public class MyViewPage extends ViewPager{

        private boolean result = false;

        public MyViewPage(Context context) {
            super(context);
        }

        public MyViewPage(Context context, AttributeSet attrs) {
            super(context, attrs);
        }

        @Override
        public boolean onInterceptTouchEvent(MotionEvent ev) {
            if (result) {

                return super.onInterceptTouchEvent(ev);
            } else {

                return false;

            }
        }

        @Override
        public boolean onTouchEvent(MotionEvent ev) {
            if (result) {
                return super.onTouchEvent(ev);
            } else {
                return false;
            }


        }


}
